package com.chengh.nami.common.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author chengh
 * 基类
 */
@Getter
@Setter
@Schema(name = "BaseEntity对象", description = "基础父类")
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = -1L;

    @TableLogic
    @Schema(name = "delFlag",description = "删除标记; 1-删除;0-未删除")
    private Integer delFlag;

    @TableField(fill = FieldFill.INSERT)
    @Schema(name = "createBy",description = "创建人ID")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(name = "createTime",description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(name = "updateBy",description = "修改人ID")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(name = "updateTime",description = "修改时间")
    private LocalDateTime updateTime;

    @Schema(name = "remark",description = "备注")
    private String remark;
}
